<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  
  <title>use hexo on different desktop | RMOE BLOG</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <meta name="description" content="edit hexo blog  on different pc思路：一个分支来存放Hexo生成的网站原始文件（hexo）， 另一个分支来存放生产的静态网页。 流程：  创建仓库，http://CrazyMilk.github.io； . 创建两个分支：master 与 hexo； . 设置hexo为默认分支（因为我们只需要手动管理这个分支上的Hexo网站文件）； 使用git clone git@g">
<meta property="og:type" content="article">
<meta property="og:title" content="use hexo on different desktop">
<meta property="og:url" content="https://romepeng.github.io/2017/09/09/edit hexo blog  on different pc/index.html">
<meta property="og:site_name" content="RMOE BLOG">
<meta property="og:description" content="edit hexo blog  on different pc思路：一个分支来存放Hexo生成的网站原始文件（hexo）， 另一个分支来存放生产的静态网页。 流程：  创建仓库，http://CrazyMilk.github.io； . 创建两个分支：master 与 hexo； . 设置hexo为默认分支（因为我们只需要手动管理这个分支上的Hexo网站文件）； 使用git clone git@g">
<meta property="og:locale" content="zh-CN">
<meta property="og:updated_time" content="2017-09-09T09:15:44.037Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="use hexo on different desktop">
<meta name="twitter:description" content="edit hexo blog  on different pc思路：一个分支来存放Hexo生成的网站原始文件（hexo）， 另一个分支来存放生产的静态网页。 流程：  创建仓库，http://CrazyMilk.github.io； . 创建两个分支：master 与 hexo； . 设置hexo为默认分支（因为我们只需要手动管理这个分支上的Hexo网站文件）； 使用git clone git@g">
  
    <link rel="alternate" href="/atom.xml" title="RMOE BLOG" type="application/atom+xml">
  
  
    <link rel="icon" href="/favicon.png">
  
  
    <link href="//fonts.googleapis.com/css?family=Source+Code+Pro" rel="stylesheet" type="text/css">
  
  <link rel="stylesheet" href="/css/style.css">
  

</head>

<body>
  <div id="container">
    <div id="wrap">
      <header id="header">
  <div id="banner"></div>
  <div id="header-outer" class="outer">
    <div id="header-title" class="inner">
      <h1 id="logo-wrap">
        <a href="/" id="logo">RMOE BLOG</a>
      </h1>
      
        <h2 id="subtitle-wrap">
          <a href="/" id="subtitle">Life Notebook.</a>
        </h2>
      
    </div>
    <div id="header-inner" class="inner">
      <nav id="main-nav">
        <a id="main-nav-toggle" class="nav-icon"></a>
        
          <a class="main-nav-link" href="/">Home</a>
        
          <a class="main-nav-link" href="/archives">Archives</a>
        
      </nav>
      <nav id="sub-nav">
        
          <a id="nav-rss-link" class="nav-icon" href="/atom.xml" title="RSS Feed"></a>
        
        <a id="nav-search-btn" class="nav-icon" title="搜索"></a>
      </nav>
      <div id="search-form-wrap">
        <form action="//google.com/search" method="get" accept-charset="UTF-8" class="search-form"><input type="search" name="q" class="search-form-input" placeholder="Search"><button type="submit" class="search-form-submit">&#xF002;</button><input type="hidden" name="sitesearch" value="https://romepeng.github.io"></form>
      </div>
    </div>
  </div>
</header>
      <div class="outer">
        <section id="main"><article id="post-edit hexo blog  on different pc" class="article article-type-post" itemscope itemprop="blogPost">
  <div class="article-meta">
    <a href="/2017/09/09/edit hexo blog  on different pc/" class="article-date">
  <time datetime="2017-09-09T09:14:24.000Z" itemprop="datePublished">2017-09-09</time>
</a>
    
  </div>
  <div class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 class="article-title" itemprop="name">
      use hexo on different desktop
    </h1>
  

      </header>
    
    <div class="article-entry" itemprop="articleBody">
      
        <h4 id="edit-hexo-blog-on-different-pc"><a href="#edit-hexo-blog-on-different-pc" class="headerlink" title="edit hexo blog  on different pc"></a>edit hexo blog  on different pc</h4><h4 id="思路："><a href="#思路：" class="headerlink" title="思路："></a>思路：</h4><p>一个分支来存放Hexo生成的网站原始文件（hexo）， 另一个分支来存放生产的静态网页。</p>
<p>流程：</p>
<ol>
<li>创建仓库，<a href="http://CrazyMilk.github.io；" target="_blank" rel="external">http://CrazyMilk.github.io；</a></li>
<li>. 创建两个分支：master 与 hexo；</li>
<li>. 设置hexo为默认分支（因为我们只需要手动管理这个分支上的Hexo网站文件）；</li>
<li>使用git clone git@github.com:CrazyMilk/CrazyMilk.github.io.git拷贝仓库；</li>
<li>在本地<a href="http://CrazyMilk.github.io文件夹下通过Git" target="_blank" rel="external">http://CrazyMilk.github.io文件夹下通过Git</a> bash依次执行npm install hexo、hexo init、npm install 和 npm install hexo-deployer-git（此时当前分支应显示为hexo）;</li>
<li>修改_config.yml中的deploy参数，分支应为master；</li>
<li>依次执行git add .、git commit -m “…”、git push origin hexo提交网站相关的文件；</li>
<li>执行hexo g -d生成网站并部署到GitHub上。</li>
</ol>
<p>作者：CrazyMilk<br>链接：<a href="https://www.zhihu.com/question/21193762/answer/79109280" target="_blank" rel="external">https://www.zhihu.com/question/21193762/answer/79109280</a><br>来源：知乎</p>

      
    </div>
    <footer class="article-footer">
      <a data-url="https://romepeng.github.io/2017/09/09/edit hexo blog  on different pc/" data-id="cj7d9twfi00037omvnlgc400g" class="article-share-link">Share</a>
      
      
    </footer>
  </div>
  
    
<nav id="article-nav">
  
    <a href="/2017/09/09/git doc/" id="article-nav-newer" class="article-nav-link-wrap">
      <strong class="article-nav-caption">Newer</strong>
      <div class="article-nav-title">
        
          git  --fast-version-control
        
      </div>
    </a>
  
  
    <a href="/2017/09/09/edit git repo in  diffrent desktop/" id="article-nav-older" class="article-nav-link-wrap">
      <strong class="article-nav-caption">Older</strong>
      <div class="article-nav-title">edit git repo in many desktop</div>
    </a>
  
</nav>

  
</article>

</section>
        
          <aside id="sidebar">
  
    

  
    

  
    
  
    
  <div class="widget-wrap">
    <h3 class="widget-title">归档</h3>
    <div class="widget">
      <ul class="archive-list"><li class="archive-list-item"><a class="archive-list-link" href="/archives/2017/09/">九月 2017</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2017/08/">八月 2017</a></li></ul>
    </div>
  </div>


  
    
  <div class="widget-wrap">
    <h3 class="widget-title">最新文章</h3>
    <div class="widget">
      <ul>
        
          <li>
            <a href="/2017/09/09/add-hexo-test/">add hexo test</a>
          </li>
        
          <li>
            <a href="/2017/09/09/git doc/">git  --fast-version-control</a>
          </li>
        
          <li>
            <a href="/2017/09/09/edit hexo blog  on different pc/">use hexo on different desktop</a>
          </li>
        
          <li>
            <a href="/2017/09/09/edit git repo in  diffrent desktop/">edit git repo in many desktop</a>
          </li>
        
          <li>
            <a href="/2017/09/09/git proxy/">git proxy</a>
          </li>
        
      </ul>
    </div>
  </div>

  
</aside>
        
      </div>
      <footer id="footer">
  
  <div class="outer">
    <div id="footer-info" class="inner">
      &copy; 2017 rome<br>
      Powered by <a href="http://hexo.io/" target="_blank">Hexo</a>
    </div>
  </div>
</footer>
    </div>
    <nav id="mobile-nav">
  
    <a href="/" class="mobile-nav-link">Home</a>
  
    <a href="/archives" class="mobile-nav-link">Archives</a>
  
</nav>
    

<script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>


  <link rel="stylesheet" href="/fancybox/jquery.fancybox.css">
  <script src="/fancybox/jquery.fancybox.pack.js"></script>


<script src="/js/script.js"></script>

  </div>
</body>
</html>